var Mock = require("mockjs");
export var data = Mock.mock("/treedata", {
  data: {
    treeData: [
      {
        value: "数之联",
        key: "1",
        id: "1",
        children: [
          {
            value: "测试部门",
            key: "1_1",
            id: "1.1",
            data: [
              {
                key: "1",
                userName: "John Brown",
                name: "John",
                organization: "New York No. 1 Lake Park",
                status: "正常",
              },
            ],
          },
          {
            value: "考拉部门",
            key: "1_2",
            id: "1.2",
            data: [
              {
                key: "1",
                userName: "John Brown",
                name: "JoJ",
                organization: "New York No. 1 Lake Park",
                status: "正常",
              },
            ],
          },
        ],
        data: [
          {
            key: "1",
            userName: "John Brown",
            name: "John",
            organization: "New York No. 1 Lake Park",
            status: "正常",
          },
          {
            key: "2",
            userName: "Jim Green",
            name: "Jim",
            organization: "London No. 1 Lake Park",
            status: "正常",
          },
          {
            key: "3",
            userName: "Joe Black",
            name: "Joe",
            organization: "Sydney No. 1 Lake Park",
            status: "正常",
          },
          {
            key: "4",
            userName: "Disabled User",
            name: "John",
            organization: "Sydney No. 1 Lake Park",
            status: "正常",
          },
        ],
      },
      {
        value: "研发",
        key: "2",
        id: "2",
        data: [
          {
            key: "1",
            userName: "John Brown",
            name: "Johnnnnn",
            organization: "New York No. 1 Lake Park",
            status: "不正常",
          },
        ],
        children: [
          {
            value: "研发部门",
            key: "2_1",
            id: "2.1",
            data: [
              {
                key: "1",
                userName: "John Brown",
                name: "John",
                organization: "New York No. 1 Lake Park",
                status: "不正常",
              },
            ],
          },
        ],
      },
    ],
  },
});

export var deleteData = Mock.mock("/removeById", "delete", ({ id }) => {
  return {
    id: id,
    code: 0,
    data: "操作成功",
  };
});
